class Employee:  
    def __init__(self, name, basic_salary):  
        self.name = name  
        self.basic_salary = basic_salary  # 基本工资  
        self.overtime_hours = 0  # 加班小时数  
        self.bonus = 0  # 奖金  
  
    def add_overtime(self, hours):  
        """添加加班小时数"""  
        self.overtime_hours += hours  
  
    def set_bonus(self, amount):  
        """设置奖金"""  
        self.bonus = amount  
  
    def calculate_salary(self):  
        """计算总工资"""  
        # 假设加班费是基本工资的1.5倍  
        overtime_pay = self.basic_salary / 21.75 * self.overtime_hours * 1.5  
        total_salary = self.basic_salary + overtime_pay + self.bonus  
        return total_salary  
  
    def __str__(self):  
        return f"员工姓名: {self.name}, 总工资: {self.calculate_salary():.2f}元"  
  
  
def main():  
    # 创建员工实例  
    employee1 = Employee("张三", 8000)  
    employee1.add_overtime(10)  # 张三加班10小时  
    employee1.set_bonus(2000)  # 张三获得奖金2000元  
  
    employee2 = Employee("李四", 7000)  
    employee2.add_overtime(5)  # 李四加班5小时  
    employee2.set_bonus(1500)  # 李四获得奖金1500元  
  
    # 打印员工工资  
    print(employee1)  
    print(employee2)  
  
if __name__ == "__main__":  
    main()